import service from "@/api/index.js";
const orderApi = {
    //添加
    insert(orderVo){
       return  service.post("/order",orderVo)
    },
    //修改
    update(order){
        return service.put("/order",order);
    },
    //条件查询
    selectByPage(condition,pageNum,pageSize){
        condition.pageNum = pageNum;
        condition.pageSize = pageSize;
        return service.get("/order",{
            params:condition
        });
    },
    //根据id查询
    selectById(id){
        return service.get(`/order/${id}`);
    },
    pay(orderVo){
        return service.post("/order/pay",orderVo)
    }
};
export default orderApi;